<template>
	<view :class="{bg141414:theme}" style="min-height: 100vh;">
		
	<view class="con pb30 " :class="theme?'colorfff':''">
		<back title="公告详情"></back>
		<view class="size30 bold flex-ju-c mt20">{{info.title}}</view>
		<view class="flex-ju-c">
			<view class="flex-a-i size22 mt20">
				<view class="wh131-30 ra30  flex-ju-c pg3" :class="theme?'colorFF6E44 borderFF6E44':'border000'">{{info.category.title}}</view>
				<view class="color999 ml20">{{info.updated_at}}</view>
			</view>
		</view>
		<view v-if="info.skus.length" class="bold border-tF5F6F7 pt30 mt30">
			相关藏品
		</view>
		<view class="flex-a-i flex-wrap">
			<view @click="navto('/pages/shichang/detail?info='+JSON.stringify(item.sku))" v-for="(item,s) in info.skus" :key="s" class="mt20 mr20">
			<!-- <view @click="navto('/pages/index/detail?type='+item.node_type+'&uuid='+item.uuid)" v-for="(item,s) in info.skus" :key="s" class="mt20 mr20"> -->
				<image :src="item.sku.thumb" class="wh130-130 ra20"></image>
				<view class="width130 one size22 center">{{item.sku.title}}</view>
			</view>
		</view>
		
		<view :class="theme?'bg292929 ':'bgF5F6F7'" class="borderE1E1E1 pg20 ra20 mt30 size26">
			<view class="kph" v-html="info.content"></view>
		</view>
	</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				theme: uni.getStorageSync('theme'),
				info:{}
			}
		},
		onLoad(option) {
			this.http(`announcement/${option.uuid}`).then(res => {
				var com = res.data.content.replace(/<img/g, '<img style="max-width:100% !important;"' )
				res.data.content = com
				this.info = res.data
			})
		},
		methods: {
			previewmage(){
				uni.previewImage({
					urls:['/static/dibu.png']
				})
			}
		}
	}
</script>

<style>

</style>
